package com.example.cnotebook;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;

public class SettingActivity extends BaseActivity implements View.OnClickListener {

    private LinearLayout itemAccount;
    private LinearLayout itemESP;
    private LinearLayout itemReaction;
    private ImageView ivBack;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_setting);
        itemAccount = findViewById(R.id.item_account);
        itemESP = findViewById(R.id.item_esp);
        itemReaction = findViewById(R.id.item_reaction);
        ivBack = findViewById(R.id.iv_back);
        itemAccount.setOnClickListener(this);
        itemESP.setOnClickListener(this);
        itemReaction.setOnClickListener(this);
        ivBack.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.iv_back:
                finish();
                break;
            case R.id.item_account:
                startActivity(new Intent(this, UserActivity.class));
                break;
            case R.id.item_esp:
                startActivity(new Intent(this, ESPActivity.class));
                break;
            case R.id.item_reaction:
                startActivity(new Intent(this, ReactionActivity.class));
                break;
        }
    }
}
